Adopted to OpenWrt target. Most likely these changes go elsewhere when done right.
--- a/service/CMakeLists.txt
+++ b/service/CMakeLists.txt
@@ -98,7 +98,7 @@ IF (UNIX AND NOT APPLE)
 	IF (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
 		SET(DEFAULT_STATE_INSTALL_DIR "/var/spool")
 	ELSE ()
-		SET(DEFAULT_STATE_INSTALL_DIR "/var/state")
+		SET(DEFAULT_STATE_INSTALL_DIR "/tmp/state") # OpenWrt has var as symlink to tmp
 	ENDIF ()
 	SET(STATE_INSTALL_DIR "${DEFAULT_STATE_INSTALL_DIR}" CACHE PATH "The directory to store state information of the devices")
 
--- a/tdadmin/CMakeLists.txt
+++ b/tdadmin/CMakeLists.txt
@@ -30,16 +30,11 @@ ELSEIF (APPLE)
 	TARGET_LINK_LIBRARIES(tdadmin
 		TelldusCore
 	)
-ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
-	# FreeBSD does not have argp in base libc; port devel/argp-standalone is required.
-	FIND_LIBRARY(ARGP_LIBRARY argp)
-	TARGET_LINK_LIBRARIES(tdadmin
-		${CMAKE_BINARY_DIR}/client/libtelldus-core.so
-		${ARGP_LIBRARY}
-	)
 ELSE (WIN32)
+	FIND_PACKAGE(argp)
 	TARGET_LINK_LIBRARIES(tdadmin
 		${CMAKE_BINARY_DIR}/client/libtelldus-core.so
+		${ARGP_LIBRARIES}
 	)
 ENDIF (WIN32)
 
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,7 +62,7 @@ IF(DOXYGEN_FOUND)
 	SET(DOXY_CONFIG ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
 
 	CONFIGURE_FILE(
-		"${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in"
+		"${CMAKE_CURRENT_SOURCE_DIR}/CMakeDoxyfile.in"
 		${DOXY_CONFIG} @ONLY
 	)
 
